<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath }"/>
<%@taglib  prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<title>低值资产管理系统</title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta content="width=device-width, initial-scale=1.0" name="viewport" />
	<meta content="" name="description" />
	<meta content="" name="author" />
	<meta name="MobileOptimized" content="320">
	<!-- BEGIN GLOBAL MANDATORY STYLES -->          
	<link href="${ctx}/assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
	<link href="${ctx}/assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
	<link href="${ctx}/assets/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
	<!-- END GLOBAL MANDATORY STYLES -->
	<!-- BEGIN THEME STYLES --> 
	<link href="${ctx}/assets/css/style-metronic.css" rel="stylesheet" type="text/css"/>
	<link href="${ctx}/assets/css/style.css" rel="stylesheet" type="text/css"/>
	<link href="${ctx}/assets/css/style-responsive.css" rel="stylesheet" type="text/css"/>
	<link href="${ctx}/assets/css/plugins.css" rel="stylesheet" type="text/css"/>
	<link href="${ctx}/assets/css/themes/light.css" rel="stylesheet" type="text/css"/>
	<link href="${ctx}/assets/css/custom.css" rel="stylesheet" type="text/css"/>
	<link rel="stylesheet" type="text/css" href="${ctx}/assets/plugins/bootstrap-daterangepicker/daterangepicker-bs3.css" />
	<link rel="stylesheet" type="text/css" href="${ctx}/assets/plugins/bootstrap-datetimepicker/css/datetimepicker.css" />
	<link rel="stylesheet" type="text/css" href="${ctx}/assets/plugins/jquery-multi-select/css/multi-select.css" />
	<link href="${ctx }/css/custom.css" rel="stylesheet" type="text/css"/>

	<link href="${ctx}/frontend/assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
   
   	<link href="${ctx}/frontend/assets/css/pages/portfolio.css" rel="stylesheet" type="text/css"/>

	<link href="${ctx}/frontend/assets/plugins/fancybox/source/jquery.fancybox.css" rel="stylesheet" />              
    <link rel="stylesheet" href="${ctx}/frontend/assets/plugins/revolution_slider/css/rs-style.css" media="screen">
    <link rel="stylesheet" href="${ctx}/frontend/assets/plugins/revolution_slider/rs-plugin/css/settings.css" media="screen"> 
    <link href="${ctx}/frontend/assets/plugins/bxslider/jquery.bxslider.css" rel="stylesheet" />       
	<!-- END THEME STYLES -->	
	<link rel="shortcut icon" href="favicon.ico" />
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed page-full-width">
	<!-- BEGIN HEADER -->   
	<%@include file="../include/header.jsp" %>
	<!-- END HEADER -->
	
	<!-- BEGIN CONTAINER -->
	<div class="page-container">
		<div class="page-content">
			
			<!-- END BEGIN STYLE CUSTOMIZER -->            
			<!-- BEGIN PAGE HEADER-->
			<div class="row">
				<div class="col-md-12">
					<!-- BEGIN PAGE TITLE & BREADCRUMB-->
					<h3 class="page-title">
						物资详情表
					</h3>
					
					<!-- END PAGE TITLE & BREADCRUMB-->
				</div>
			</div>
			<!-- END PAGE HEADER-->
			<!-- BEGIN PAGE CONTENT-->          
			<div class="row">
				<div class="col-md-12">
					
					<!-- BEGIN SAMPLE TABLE PORTLET-->
					<div class="portlet box green">
						<div class="portlet-title">
							<div class="caption"><i class="fa fa-cogs"></i>物资详情表</div>
							<div class="tools">
								<a href="javascript:;" class="collapse"></a>
							</div>
						</div>
						<div class="portlet-body flip-scroll">
							<div class="portlet-body">
								<div class="table-scrollable" id="tableDiv" style="overflow-y:scroll;">
									<table class="table table-striped table-bordered table-hover" id="sample_1">
										<thead class="flip-content">
											<tr>									
												<th style="text-align:center">资产编号</th>									
												<th style="text-align:center">物资名称</th>
												<th style="text-align:center">物资品牌</th>										
												<th style="text-align:center">规格型号</th>										
												<th style="text-align:center">产品序列号</th>
												<th style="text-align:center">物资类别</th>
												<th style="text-align:center">资产编码</th>
												<th style="text-align:center">生产厂家</th>
												<th style="text-align:center">供应商名称</th>
												<th style="text-align:center">购买日期</th>
												<th style="text-align:center">保修截止日期</th>
												<th style="text-align:center">使用状态</th>
												<th style="text-align:center">入库日期</th>
												<th style="text-align:center">增加方式</th>
												<th style="text-align:center">出库日期</th>
												<th style="text-align:center">物资原值</th>
												<th style="text-align:center">净残值率</th>
												<th style="text-align:center">物资净值</th>
												<th style="text-align:center">折旧月限</th>
												<th style="text-align:center">报废月限</th>
												<th style="text-align:center">折旧方式</th>
												<th style="text-align:center">已折旧月数</th>
												<th style="text-align:center">累计折旧金额</th>
												<th style="text-align:center">盘点状态</th>										
												<th style="text-align:center">存放地点</th>
												<th style="text-align:center">管理部门</th>
												<th style="text-align:center">使用部门</th>
												<th style="text-align:center">使用人</th>	
											</tr>
										</thead>							
										<tbody>
											<c:forEach items="${wuZiList }" var="u">
											<tr>
												<td>${u.ziChanBH }</td>
												<td>${u.wuZiMC }</td>
												<td>${u.pinPai }</td>
												<td>${u.guiGeXH }</td>
												<td>${u.chanPinXLH }</td>
												<td>${u.wuZiLB.leibieMC }</td>
												<td>${u.ziChanBM }</td>
												<td>${u.shengChanCJ }</td>
												<td>${u.gongYingShangMC }</td>
												<td><fmt:formatDate value="${u.gouMaiRQ }" pattern="yyyy-MM-dd"/></td>
												<td><fmt:formatDate value="${u.baoXiuJZRQ }" pattern="yyyy-MM-dd"/></td>
												<td>${u.shiYongZT.zhangTaiMC }</td>
												<td><fmt:formatDate value="${u.ruKuRQ }" pattern="yyyy-MM-dd"/></td>
												<td>${u.zengJiaFS }</td>
												<td><fmt:formatDate value="${u.chuKuRQ }" pattern="yyyy-MM-dd"/></td>
												<td>${u.wuZiYZ }${u.biZhong.biZhongMC }</td>
												<td>${u.jingCanZhiLv }%</td>
												<td>${u.wuZiJingZhi }${u.biZhong.biZhongMC }</td>
												<td>${u.zheJiuYX }</td>
												<td>${u.baoFeiYX }</td>
												<td>${u.zheJiuFS.zheJiuFSMC }</td>
												<td>${u.zheJiuYS }</td>
												<td>${u.leiJiZJJE }</td>
												<td>
													<c:choose>
														<c:when test="${u.panDian==0 }">盘点正常</c:when>
														<c:when test="${u.panDian==1 }">盘点中</c:when>
														<c:when test="${u.panDian==2 }">盘点丢失</c:when>
														<c:when test="${u.panDian==3 }">补办移交</c:when>
														<c:when test="${u.panDian==4 }">实物盘点</c:when>
														<c:when test="${u.panDian==5 }">盘点报废</c:when>
														<c:when test="${u.panDian==8 }">盘点终止</c:when>
													</c:choose>
												</td>
												<td>${u.cunFangD }</td>
												<td>${u.guanLiBM.depName }</td>
												<td>${u.dep.depName }</td>										
												<td>${u.user.name }</td>														
											</tr>
											</c:forEach>
										</tbody>							
									</table>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>

		</div>
		<!-- END PAGE -->
	</div>
	<!-- END CONTAINER -->
	<!-- BEGIN FOOTER -->
	<%@include file="../include/footer.jsp" %>
	<!-- END FOOTER -->
	<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
	<!-- BEGIN CORE PLUGINS -->   
	<!--[if lt IE 9]>
	<script src="${ctx}/assets/plugins/respond.min.js"></script>
	<script src="${ctx}/assets/plugins/excanvas.min.js"></script> 
	<![endif]-->   
	<script src="${ctx}/assets/plugins/jquery-1.10.2.min.js" type="text/javascript"></script>
	<script src="${ctx}/assets/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>    
	<script src="${ctx}/assets/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
	<script src="${ctx}/assets/plugins/bootstrap-hover-dropdown/twitter-bootstrap-hover-dropdown.min.js" type="text/javascript" ></script>
	<script src="${ctx}/assets/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
	<script src="${ctx}/assets/plugins/jquery.blockui.min.js" type="text/javascript"></script>  
	<script src="${ctx}/assets/plugins/jquery.cookie.min.js" type="text/javascript"></script>
	<script src="${ctx}/assets/plugins/uniform/jquery.uniform.min.js" type="text/javascript" ></script>

	<script src="${ctx}/assets/scripts/form-components.js"></script>
	<script type="text/javascript" src="${ctx}/assets/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
	<script type="text/javascript" src="${ctx}/assets/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
	<script type="text/javascript" src="${ctx}/assets/plugins/clockface/js/clockface.js"></script>
	<script type="text/javascript" src="${ctx}/assets/plugins/bootstrap-daterangepicker/moment.min.js"></script>
	<script type="text/javascript" src="${ctx}/assets/plugins/bootstrap-daterangepicker/daterangepicker.js"></script>
	<script type="text/javascript" src="${ctx}/frontend/assets/plugins/revolution_slider/rs-plugin/js/jquery.themepunch.plugins.min.js"></script>
    <script type="text/javascript" src="${ctx}/frontend/assets/plugins/revolution_slider/rs-plugin/js/jquery.themepunch.revolution.min.js"></script> 
    <script type="text/javascript" src="${ctx}/frontend/assets/plugins/bxslider/jquery.bxslider.min.js"></script>    
    <script src="${ctx}/frontend/assets/scripts/index.js"></script>
	<!-- END CORE PLUGINS -->
	<script src="${ctx}/assets/scripts/app.js"></script>
	
	<script>
		jQuery(document).ready(function() {       
		   // initiate layout and plugins
		   App.init();		   
		   /* App.initBxSlider();
           Index.initRevolutionSlider();
		   FormComponents.init(); */
		    var screen_height=screen.height;
			var scroller_height=screen_height-360;
			$('#tableDiv').height(scroller_height);
		});
		
		$('#daYinTiaoMa').bind("click",function(){
			var _CTX="${ctx}";
			$.ajax({
				url:"${ctx}/wuzi/tiaoMaDaYin.do?id=${wuZi.id}",
				type:"POST",
				success:function(data){
					window.open(_CTX+data,'_blank');
					/* var tuPian="<image src=\""+_CTX+data+"\">";
					//window.print(tuPian);
					//tuPian.print();
					var headstr = "<html><head><title></title></head><body>";
					var footstr = "</body>";
					var newstr = document.all.item(tuPian).innerHTML;
					var oldstr = document.body.innerHTML;
					document.body.innerHTML = headstr+newstr+footstr;
					window.print(); 
					document.body.innerHTML = oldstr;
					return false; */
				}
			});
		});
		
		var shanChuGLPJ=function(id){
			$.ajax({
				type:"POST",
				data:{					
					'cid':id
				},
				url:"${ctx}/wuzi/shanChuGLPJ.do",
				success:function(data){
					window.location.reload();
				}
			});
		}		
		
		var shanChuGLZJ=function(id){
			$.ajax({
				type:"POST",
				data:{
					"cid":"${wuZi.id}"
				},
				url:"${ctx}/wuzi/shanChuGLZJ.do",
				success:function(data){
					window.location.reload();
				}
			});
		}
	</script>
</body>
<!-- END BODY -->
</html>